package itheima.com.mycountdown;

import java.util.concurrent.CountDownLatch;

public class ChileThread3 extends Thread {
private CountDownLatch countDownLatch;

    public ChileThread3(CountDownLatch countDownLatch) {
        this.countDownLatch=countDownLatch;
    }

    @Override
    public void run() {
        //吃饺子
        for (int i = 1; i <= 20; i++) {
            System.out.println(getName()+"再吃"+i+"个饺子");
        }
        //吃完说一声
        countDownLatch.countDown();
    }
}
